import logging

import yagmail


def log_set():
    logging.basicConfig(filemode='log.txt',level=logging.DEBUG,filename='w+',
                    format="%(asctime)s *** % (levelname)s *** %(message)s")

def send_nall(filepath):
    mail = yagmail.SMTP(user='1362804171@qq.com',password='djbrrcbllmtjecha',host='smtp.qq.com')
    mail.send(to='231988636@qq.com',subject='测试报告',contents='今日推荐，请查看',attachments=filepath)